﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SRB.Tg.Model
{
    public enum eRebarClass
    {
        None=0,
        R = 300,
        Y = 400,
        T = 500,
    }





    public abstract class RebarBase
    {
        public eRebarClass ClassName;
        public eRebarDia Diameter;
        public string TypeName;

        public RebarBase()
        {
            ClassName = 0;
            Diameter = 0;
            TypeName = "";
        }
        public RebarBase(string typeName,eRebarClass clsName, eRebarDia diameter)
        {
            ClassName = clsName;
            Diameter = diameter;
            if(string.IsNullOrWhiteSpace(typeName))
            {
                throw new ArgumentNullException(nameof(typeName));
            }
            TypeName = typeName;
        }

        public abstract double TotalLength { get; }

    }

    public class RebarCollection : List<Tuple<RebarBase, int>>
    {
        public RebarCollection()
        {
        }

        public RebarCollection(int capacity) : base(capacity)
        {
        }

        public RebarCollection(IEnumerable<Tuple<RebarBase, int>> collection) : base(collection)
        {
        }
    }



}
